<script type="text/javascript">
function viewAddPage(id){
	if(id!=null){
        _tabs.showPage("information",null,'ID=' + id,null);
    }else {
        _tabs.showPage("information",null,null,null);
    }
}

function onDelete(rows){
	CommonUtil.del(rows, "id", "${basePath}/sys/info/deleteInfo",null,function(){
    	_tabs.showPage("list");
    });
}

function addClick(){
	_tabs.showPage("information",null,null,null);
}

function delRows(id){
	CommonUtil.del(null,id,"${basePath}/sys/info/deleteInfo",null,function(){
        _tabs.showPage("list");
    });
}

</script>
<div class="box">
	<div class="box-body">
		<div class="row marginZero">
				<epoch:table id="templateTable"
						queryUrl="${basePath}/sys/info/findInfoListAjax" rowId="id" showRefresh="true"
						onDelClick="onDelete" onAddClick="addClick" newBtn="true" delBtn="true" onDelClick="onDelete"
                    onAddClick="addClick"  defTipColHead="true">
						<epoch:tr check="checkbox" titleTip="全选"></epoch:tr>
						<epoch:tr name="消息标题" formName="info_title">
							<a href="javascript:void(0);" onclick="viewAddPage('~{row.id}')">~{value}</a>
						</epoch:tr>
						<epoch:tr name="消息类型" formName="info_type" filterType="select" width="10%"
							   filterData="${lisFun.dictForFilter('SYS_INFO_TYPE')}"></epoch:tr>
						<epoch:tr name="消息描述" formName="info_desc" width="50%"></epoch:tr>
						<epoch:tr name="状态" formName="status" filterType="select" width="10%"
								filterData="${lisFun.dictForFilter('PUB_ENABLE_DISABLE')}"></epoch:tr>
						<epoch:tr name="操作" switchable="false" width="10%">
							<button class="btn btn-danger btn-xs" onclick="delRows('~{row.id}');">
			                	<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
			                </button>
						</epoch:tr>
					</epoch:table>
		        </div>
		</div>
	</div>
